
<template>
  <div>
    <!-- 三级联动全局组件 -->
    <TypeNav/>
    <ListContanier/>
    <Recommend/>
    <Rank/>
    <Like/>
    <Floor v-for="floor in floorList" :key="floor.id" :floorData="floor"/>
    <Brand/>
  </div>
</template>

<script>
import ListContanier from './ListContanier';
import Recommend from './Recommend';
import Rank from './Rank';
import Like from './Like';
import Floor from './Floor';
import Brand from './Brand';
import { mapState } from 'vuex';
export default {
  name: 'ListContainer',
  components:{
    ListContanier,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand
  },
  mounted() {
    //派发action，获取floor组件的数据
    this.$store.dispatch('getFloorList');
  },
  computed:{
    ...mapState({
      floorList:(state) => state.home.floorList,
    })
  }
}
</script>

<style lang="scss" scoped>

</style>

